package com.eight.feign;

import com.eight.vo.ComResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient("rentcar-upload")
public interface UploadFeign {
    /**
     * 文件上传
     * @param file 文件夹
     * @param dirPath 文件名称
     * @return 返回上传结果
     */
    @RequestMapping(value = "/upload/ossfile/{dirPath}" , consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public ComResult upload(@RequestPart(value = "file") MultipartFile file, @PathVariable(value = "dirPath") String dirPath);
}
